<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>课工场论坛列表</title>
    <link href="css/bbs.css" rel="stylesheet">
    <style>
    	.clearfix:after{
    		display:table;
    		content: "";
    		clear:both;
    	}
    	.fl{
    		float:left;
    	}
    	</style>
    
</head>
<body>
<div class="bbs">
    <header><span>我要发帖</span></header>
    <section>
        <ul></ul>
    </section>
    <div class="post">
        <input class="title" pslaceholder="请输入标题（1-50个字符）">
        所属版块：<select><option>请选择版块</option><option>电子书籍</option><option>新课来了</option><option>新手报到</option><option>职业规划</option></select>
        <textarea class="content"></textarea>
        <input class="btn" value="发布">
    </div>
</div>
<script src="jquery-3.2.1.js"></script>
<script src="time.js"></script>
<script>
	$(function(){
		$("header span").click(function(){
			$(".post").show(300);
		});
		$(".btn").click(function(){
			$(".post").hide(300);
		
			var $chat=$("<div class='chat clearfix'></div>");
			$("header").after($chat);
			var $img=$("<img class='fl' src='images/tou01.jpg' style='margin-right:10px'/>");
			var $cnt=$("<div class='cnt fl'></div>");
			var $name=$("<div class='name'><h3>"+$(".title").val()+"</h3></div>");
			var $txt=$("<div class='txt'><span>版块:"+$(".post select").val()+"</span><span>发表时间:<span>"+getNow()+"</div>");
			$(".chatText").val("")
			$cnt.append($name);
			$cnt.append($txt);
			$chat.append($img);	
			$chat.append($cnt);	
			
		});
	})
</script>
</body>
</html>